package ms;

import java.util.Scanner;


public class MM {
	
	public static void main(String[] args) {
		int []prime = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43};
		
		Scanner in = new Scanner(System.in);
		while(in.hasNext()) {
			long x = in.nextLong();
			
			long sum = 0, ans = 0;
			long Max = 0;
			int time;
	        for(long num = 1; num <= x; num++) {
	            sum = 1;
	            long temp = num;
	            for(int i = 0; i < prime.length; i++){
	                time = 0;
	                if(temp / prime[i] == 0) {
	                	break;
	                }
	                while(temp % prime[i] == 0) {
	                	if(temp < 0) {
	                		System.out.println("yes");
	                	}
	                    temp /= prime[i];
	                    time++;
	                }
	                sum *= (1 + time);
	                if(temp == 1)
	                    break;
	            }
	            if(sum > Max) {
	                Max = sum;
	                ans = num;
	            }
	        }
	        System.out.println(ans);	     
	   }
	}
}
